<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>客户地图</title>
<%@ include file="/common/util.jsp"%>

<script src="${cdnctx}/js/paging.js" type="text/javascript"></script>
<link href="${cdnctx}/css/chinamap.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
$(document).ready(function(){
	
		for ( var i = 1; i < 12; i++) {
	        $("#id" + i).removeClass("current");
	    }
	    $("#id11").addClass("current");
	    
	    var mapleft=$("#map").offset().left;
	    var maptop=$("#map").offset().top;
    	var size = $("#size").val();
    	for(var i=0;i<size;i++){
    		var positionX = parseInt(mapleft)+parseInt($("#positionX_"+i).val());
	    	var positionY = parseInt(maptop)+parseInt($("#positionY_"+i).val());
	    	$("#mapPosition_"+i).css({'position':'absolute','left':parseInt(positionX)-220,'top':parseInt(positionY)-140});
    	}
	});


</script>
</head>
<body class="main">
	<div class="-frame -style -luster" id="css_container">
		<!--首页框架页眉部分↓-->
		<%@ include file="/WEB-INF/pages/inc/header.jsp"%>
		<!--首页框架页眉部分↑-->

		<div class="content">

			<!-- Left导航菜单◎开始 -->
			<%@ include file="/WEB-INF/pages/inc/leftmenu.jsp"%>
			<!-- Left导航菜单◎结束 -->

			<div class="main-mid">
				<div class="pos"><img src="${cdnctx}/src/index/img/index.png"><a href="#">客户地图</a>
				</div>
				<div class="css_contentDiv">
						<div class="${companyRegion}_map">
							<img id="map" src="${cdnctx}/images/chinamap/${companyRegion}.jpg" width='800px' height='540px'/>
								<c:forEach items="${companyList}" var="crEntity" varStatus="status">
									<a class="point" id="mapPosition_${ status.index}" href="${cdnctx}/business/init.shtml?companycode=${crEntity.companycode}" >
										<img src="${cdnctx}/images/chinamap/posi.png"></a>
								</c:forEach>
								
								<div id="tc_div">
									<c:forEach items="${companyList}" var="crEntity2" varStatus="status">
										<ul class="tc" style="display:none;">
											<li>公司名称：${crEntity2.customername}</li>
											<li>公司位置：${crEntity2.companyaddress}</li>
								            <li>节能目标：${crEntity2.savetarget}</li>
										</ul>
									</c:forEach>
								</div>
								<input type="hidden" id="size" value="${companyList.size()}" />
								<c:forEach items="${companyList}" var="crEntity" varStatus="status">
										<input type="hidden" id="positionY_${status.index}" value="${crEntity.positiony}" />
										<input type="hidden" id="positionX_${status.index}" value="${crEntity.positionx}" />
								</c:forEach>
							<script>
							$(".point").mouseover(function(e){
								var ul = $("#tc_div ul").eq($(this).index()-1); 
								ul.css("position","absolute"); 
								ul.css("left",document.body.scrollLeft-300+event.clientX);  
								ul.css("top",document.body.scrollLeft-250+event.clientY); 
								ul.show();
							}).mouseout(function(e){
								$("#tc_div ul").eq($(this).index()-1).hide();
							})
						</script>
						
						</div>
				</div>
			</div>

		</div>

		<!--首页框架页尾部分↓-->
		<%@ include file="/WEB-INF/pages/inc/footer.jsp"%>
		<!--首页框架页尾部分↑-->
	</div>
</body>
</html>